home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
5
/
CHASSIS_
/
MYHEADER.H
< prev
next >
Wrap
Text File
|
1992-05-17
|
8KB
|
204 lines
/************************************************************************************/
/* MidRoad.h */
/* */
/* See also MyGlobals.c */
/************************************************************************************/
/************************************************************************************/
/* The following headers are precompiled into module <MidRoadHeaders>, */
/* and included automatically by the compiler: */
/* */
/* string.h BDC.h Controls.h */
/* Desk.h Devices.h Dialogs.h */
/* DiskInit.h Errors.h Events.h */
/* Files.h Fonts.h GestaltEqu.h */
/* Lists.h Memory.h Menus.h */
/* Notification.h OSEvents.h OSUtils.h */
/* Packages.h PrintTraps.h Quickdraw.h */
/* Resources.h Scrap.h SegLoad.h */
/* Sound.h StandardFile.h TextEdit.h */
/* Timer.h ToolUtils.h Types.h */
/* Windows.h pascal.h asm.h */
/* LoMem.h THINK.h */
/* */
/************************************************************************************/
/************************** */
/* SYMBOL DEFINITIONS * */
/************************** */
#define NIL 0
#define windMax 16
#define windTEHMax 12
#define windCntlHMax 8
#define helpCount 17
#define ProcMain 1
#define ProcHelp 2
#define ProcText 3
#define AppleMenuID 128
#define AboutItem 1
#define HelpItem 2
#define FileMenuID 129
#define NewItem 1
#define OpenItem 2
#define SaveItem 4
#define SaveAsItem 5
#define PageSetupItem 7
#define PrintItem 8
#define CloseItem 10
#define QuitItem 12
#define EditMenuID 130
#define CutItem 1
#define CopyItem 2
#define PasteItem 3
#define ClearItem 4
#define ProgramMenuID 131
#define KudosItem 1
/************************** */
/* PROTOTYPES * */
/************************** */
int InitMac(void);
int ShutMac(void);
int MouseDownProc(void);
int KeyDownProc(void);
int SetUpMenus(void);
int MenuProc(long);
int ShowInfoDlog(int dlogNo);
pascal void DrawDefaultBorder(DialogPtr, short);
pascal void DrawUserIcon(DialogPtr, short);
int MainGetProc(void);
int MainDrawProc(void);
int WhichWindow(WindowPtr, int *);
int MainWindowProc(void);
int MainCloseProc(void);
int NextSubAndPosit(Point *);
int TextGetProc(void);
int TextDrawProc(void);
int TextWindowProc(void);
int TextResizeProc(void);
int TextCloseProc(void);
int HelpGetProc(void);
int HelpDrawProc(void);
int HelpWindowProc(void);
int HelpCloseProc(void);
int PlaceAlert(int);
pascal Boolean myActionProc(ControlHandle, short);
pascal Boolean myClikLoop(void);
int MenuUpdate(int);
int CursorSelect(WindowPtr, int, int);
int FileOpenProc(void);
int FileSaveProc (Boolean);
long ReadIntoTE(int, TEHandle);
long WriteFromTE(int, TEHandle);
pascal void myIdleProc(void);
int PrintWindowProc(int);
int FinderFilesProc(void);
Boolean ColorCheck(void);
/************************** */
/* EXTERNAL VARIABLES * */
/************************** */
extern int MainRetCode; /* main program return code */
extern int WorkRetCode; /* work return code */
extern int j,k,l,m,n; /* work variables */
extern long worklong; /* work variable */
extern Rect workRect; /* work variable */
extern int workInt; /* work variable */
extern Handle workHandle; /* work variable */
extern Point workPoint; /* work variable */
extern char workChar; /* work variable */
extern TEHandle workTEHandle; /* work variable */
extern ControlHandle workControlHandle; /* work variable */
extern Str255 workStr255; /* work variable */
extern Boolean workBoolean; /* work variable */
extern GrafPtr workGrafPtr; /* work variable */
extern EventRecord myEvent; /* from event loop */
extern int myQuitFlag; /* flag to get out of event loop */
extern WindowPtr workWindowPtr; /* pointer from FindWindow */
extern int myMouseWhere; /* location (not Point) of mouse */
extern char testChar; /* character for boolean operations */
extern MenuInfo **myMenuHandle[4]; /* handles for various menus */
extern Str255 menuItemName; /* name returned from menu select */
extern int mymenuID; /* menu ID from MenuSelect */
extern int mymenuItem; /* menu item number from MenuSelect */
extern DialogPtr myDlogPtr; /* pointer to active dialog */
extern DialogTemplate myDTmpl,**myDTmplH; /* template for active dialog */
extern AlertTemplate myATmpl,**myATmplH; /* template for active Alert */
extern struct wTblStruct /* space for some window info */
{
WindowPtr windPtr; /* pointer to window record */
WindowRecord windRec; /* window record */
TEHandle windTEH[windTEHMax]; /* handles for TE items */
int windTEHCount; /* how many handles are in use */
int windTEHSub; /* subscript for active TE item */
ControlHandle windCntlH[windCntlHMax]; /* handles to controls */
int windCntlHSub; /* subscript for active control */
int windCntlHCount; /* how many controls are in use */
SFReply windReply; /* SF Reply associated with window */
int windPathRefNum; /* Path reference number from open */
Boolean windTEChanged; /* Data changed since previous save */
}
windTbl[windMax]; /* table of many of the above */
extern int windSub; /* subscript for window table */
extern int myResRefNum; /* application res file ref num */
extern int initResRefNum; /* res file ref num after inits */
extern Rect myDragRect; /* outer bounds for dragging */
extern Point nextTextPosit; /* Position of next text window */
extern Rect destRect; /* for calculations of TE areas */
extern Rect viewRect; /* for calculations of TE areas */
extern RgnHandle workRegionH; /* work handle for TE redraw */
extern WindowPtr mouseWindPtr; /* pointer to window with cursor */
extern Point locMouse; /* local coords of mouse */
extern Point gMouse; /* global coords of mouse */
extern int mouseWindPart; /* part code in window */
extern SFReply workReply; /* work area for std file reply */
extern int workRC; /* work area for open return code */
extern int workPathRefNum; /* work area path ref num from open */
extern int appMessage; /* startup message from Finder */
extern int appCount; /* number of docs from Finder */
extern AppFile appTheFile; /* file information from Finder */
extern long appMenuLong; /* menu longword for menu proc */
extern int appIndex; /* index pointer for GetAppFiles */
extern THPrint prRecHdl; /* handle to print record */
extern TPPrPort prPortPtr; /* pointer to print port */
extern Boolean useColor; /* should we use color windows, etc */
extern Handle theSnd; /* handle to sound resource */
extern OSErr sndRC; /* return code from SndPlay */
extern Ptr theSndChan; /* sound channel */
extern ScrapStuff *scrapPtr; /* pointer to desk scrap */
extern long scrapOffset; /* offset from beginning of scrap */
extern ListHandle helpList; /* handle for List Manager */
extern Point helpCell; /* cell for List Manager */
extern long helpLong; /* for help facility */
extern Rect helpRect; /* for help facility */
extern Handle helpHandle; /* work handle for help */
extern int helpPrev; /* previously selected help item */
extern struct versRec /* vers resource */
{
char versChar[520];
}
**versRecHandle;
extern Str255 versLongStr; /* long string from vers resource */